(global.webpackJsonp = global.webpackJsonp || []).push([ [ "pages/work/contract/confirm" ], {
    1727: function(t, n, e) {
        e.r(n);
        var o, c = e("e1c4"), i = e("93dc");
        for (o in i) "default" !== o && function(t) {
            e.d(n, t, function() {
                return i[t];
            });
        }(o);
        e("ca9c");
        var r = e("f0c5"), c = Object(r.a)(i.default, c.b, c.c, !1, null, null, null, !1, c.a, void 0);
        n.default = c.exports;
    },
    "93dc": function(t, n, e) {
        e.r(n);
        var o, c = e("960a"), i = e.n(c);
        for (o in c) "default" !== o && function(t) {
            e.d(n, t, function() {
                return c[t];
            });
        }(o);
        n.default = i.a;
    },
    "960a": function(t, e, c) {
        (function(o) {
            function n(n, t) {
                var e, o = Object.keys(n);
                return Object.getOwnPropertySymbols && (e = Object.getOwnPropertySymbols(n), t && (e = e.filter(function(t) {
                    return Object.getOwnPropertyDescriptor(n, t).enumerable;
                })), o.push.apply(o, e)), o;
            }
            Object.defineProperty(e, "__esModule", {
                value: !0
            });
            var t = {
                components: {},
                data: function() {
                    return {
                        house: {},
                        user: {},
                        id: 0,
                        contract: {}
                    };
                },
                computed: function(o) {
                    for (var t = 1; t < arguments.length; t++) {
                        var c = null != arguments[t] ? arguments[t] : {};
                        t % 2 ? n(Object(c), !0).forEach(function(t) {
                            var n, e;
                            n = o, t = c[e = t], e in n ? Object.defineProperty(n, e, {
                                value: t,
                                enumerable: !0,
                                configurable: !0,
                                writable: !0
                            }) : n[e] = t;
                        }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(o, Object.getOwnPropertyDescriptors(c)) : n(Object(c)).forEach(function(t) {
                            Object.defineProperty(o, t, Object.getOwnPropertyDescriptor(c, t));
                        });
                    }
                    return o;
                }({}, (e.default = void 0, c("26cb").mapState)({})),
                onLoad: function() {
                    var t = this.$Route.query;
                    this.id = t.id, this.init();
                },
                onReady: function() {},
                beforeRouteLeave: function(t, n, e) {
                    console.info("leave"), e();
                },
                methods: {
                    init: function() {
                        this.getContract();
                    },
                    getContract: function() {
                        var n = this;
                        this.$api("contract.contract_detail", {
                            id: n.id
                        }).then(function(t) {
                            0 == t.errno && (n.contract = t.data.contract);
                        });
                    },
                    navToHouse: function() {
                        this.$Router.push({
                            path: "/pages/work/select-house",
                            query: {}
                        });
                    },
                    onChooseImg: function(n, t) {
                        var e = this;
                        n.length, e.$tools.chooseImage(t).then(function(t) {
                            t.forEach(function(t) {
                                e.$tools.uploadFile("file.upload", t).then(function(t) {
                                    n.push(t.url);
                                });
                            });
                        });
                    },
                    delImg: function(n, e) {
                        o.showModal({
                            title: "删除照片",
                            content: "确定要删除这张照片么？",
                            cancelText: "取消",
                            confirmText: "删除",
                            success: function(t) {
                                t.confirm && n.splice(e, 1);
                            }
                        });
                    },
                    see: function() {
                        o.showLoading({
                            title: "正在提交"
                        }), this.$api("contract.contract_see", {
                            contract_id: this.id
                        }).then(function(t) {
                            0 == t.errno && (t = t.data.url, o.downloadFile({
                                url: t,
                                success: function(t) {
                                    t = t.tempFilePath;
                                    o.openDocument({
                                        filePath: t,
                                        showMenu: !0,
                                        success: function(t) {
                                            console.log("打开成功");
                                        },
                                        fail: function(t) {
                                            console.log(t);
                                        }
                                    });
                                },
                                fail: function(t) {
                                    console.log(t);
                                },
                                complete: function(t) {
                                    o.hideLoading();
                                }
                            }));
                        });
                    },
                    formSubmit: function(t) {
                        var n = this;
                        o.showLoading({
                            title: "正在加载"
                        }), n.$api("contract.contract_confirm", {
                            id: n.id
                        }, "post").then(function(t) {
                            o.hideLoading(), 0 == t.errno && (n.$tools.toast("确认成功"), setTimeout(function() {
                                n.$Router.back();
                            }, 500));
                        });
                    }
                }
            };
            e.default = t;
        }).call(this, c("543d").default);
    },
    ca9c: function(t, n, e) {
        var o = e("e98c");
        e.n(o).a;
    },
    dd6b: function(t, n, o) {
        (function(t) {
            o("767a"), e(o("66fd"));
            var n = e(o("1727"));
            function e(t) {
                return t && t.__esModule ? t : {
                    default: t
                };
            }
            wx.__webpack_require_UNI_MP_PLUGIN__ = o, t(n.default);
        }).call(this, o("543d").createPage);
    },
    e1c4: function(t, n, e) {
        e.d(n, "b", function() {
            return o;
        }), e.d(n, "c", function() {
            return c;
        }), e.d(n, "a", function() {});
        var o = function() {
            this.$createElement;
            this._self._c;
        }, c = [];
    },
    e98c: function(t, n, e) {}
}, [ [ "dd6b", "common/runtime", "common/vendor" ] ] ]);